package com.mazaiting.rabbitmq.executor;

import com.mazaiting.rabbitmq.callback.IMessageCallback;
import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;

/**
 * 消息执行器
 */
public interface IMessageExecutor {

    /**
     * 执行
     *
     * @param message 消息
     * @param channel 通道
     * @param clazz 类字节码
     * @param callback 消息回调
     */
    <T> void execute(Message message, Channel channel, Class<T> clazz, IMessageCallback<T> callback);

}
